home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1041 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  2.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 69 73 | 6f 6e 65 77 73 2e 62 62 |Path: is|onews.bb|
|00000010| 6e 2e 68 70 2e 63 6f 6d | 21 6e 65 77 73 0a 46 72 |n.hp.com|!news.Fr|
|00000020| 6f 6d 3a 20 4d 61 6e 66 | 72 65 64 5f 4c 61 6e 67 |om: Manf|red_Lang|
|00000030| 65 20 3c 4d 61 6e 66 72 | 65 64 5f 4c 61 6e 67 65 |e <Manfr|ed_Lange|
|00000040| 40 62 62 6e 2e 68 70 2e | 63 6f 6d 3e 0a 4e 65 77 |@bbn.hp.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 2b 2b 0a 53 | 75 62 6a 65 63 74 3a 20 |ng.c++.S|ubject: |
|00000070| 52 65 3a 20 43 61 6e 20 | 49 20 75 73 65 20 6e 65 |Re: Can |I use ne|
|00000080| 77 20 69 6e 20 63 6f 6e | 73 74 72 75 63 74 6f 72 |w in con|structor|
|00000090| 73 20 6f 66 20 73 74 61 | 74 69 63 20 6f 62 6a 65 |s of sta|tic obje|
|000000a0| 63 74 73 3f 0a 44 61 74 | 65 3a 20 38 20 4a 61 6e |cts?.Dat|e: 8 Jan|
|000000b0| 20 31 39 39 36 20 30 38 | 3a 32 34 3a 30 36 20 47 | 1996 08|:24:06 G|
|000000c0| 4d 54 0a 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |MT.Organ|ization:|
|000000d0| 20 48 65 77 6c 65 74 74 | 2d 50 61 63 6b 61 72 64 | Hewlett|-Packard|
|000000e0| 2c 20 45 75 72 6f 70 65 | 61 6e 20 53 75 70 70 6f |, Europe|an Suppo|
|000000f0| 72 74 20 54 65 63 68 6e | 6f 6c 6f 67 79 20 4c 61 |rt Techn|ology La|
|00000100| 62 20 28 45 53 54 4c 29 | 0a 4d 65 73 73 61 67 65 |b (ESTL)|.Message|
|00000110| 2d 49 44 3a 20 3c 34 63 | 71 6b 62 36 24 70 61 72 |-ID: <4c|qkb6$par|
|00000120| 40 69 73 6f 69 74 31 30 | 39 2e 62 62 6e 2e 68 70 |@isoit10|9.bbn.hp|
|00000130| 2e 63 6f 6d 3e 0a 52 65 | 66 65 72 65 6e 63 65 73 |.com>.Re|ferences|
|00000140| 3a 20 3c 34 63 6b 35 66 | 76 24 6c 70 31 40 74 72 |: <4ck5f|v$lp1@tr|
|00000150| 61 6e 73 66 6f 72 6d 65 | 72 2e 70 74 69 2d 75 73 |ansforme|r.pti-us|
|00000160| 2e 63 6f 6d 3e 0a 4e 4e | 54 50 2d 50 6f 73 74 69 |.com>.NN|TP-Posti|
|00000170| 6e 67 2d 48 6f 73 74 3a | 20 68 70 65 73 74 6c 30 |ng-Host:| hpestl0|
|00000180| 38 2e 62 62 6e 2e 68 70 | 2e 63 6f 6d 0a 4d 69 6d |8.bbn.hp|.com.Mim|
|00000190| 65 2d 56 65 72 73 69 6f | 6e 3a 20 31 2e 30 0a 43 |e-Versio|n: 1.0.C|
|000001a0| 6f 6e 74 65 6e 74 2d 54 | 79 70 65 3a 20 74 65 78 |ontent-T|ype: tex|
|000001b0| 74 2f 70 6c 61 69 6e 3b | 20 63 68 61 72 73 65 74 |t/plain;| charset|
|000001c0| 3d 75 73 2d 61 73 63 69 | 69 0a 43 6f 6e 74 65 6e |=us-asci|i.Conten|
|000001d0| 74 2d 54 72 61 6e 73 66 | 65 72 2d 45 6e 63 6f 64 |t-Transf|er-Encod|
|000001e0| 69 6e 67 3a 20 37 62 69 | 74 0a 58 2d 4d 61 69 6c |ing: 7bi|t.X-Mail|
|000001f0| 65 72 3a 20 4d 6f 7a 69 | 6c 6c 61 20 31 2e 32 32 |er: Mozi|lla 1.22|
|00000200| 20 28 57 69 6e 64 6f 77 | 73 3b 20 49 3b 20 33 32 | (Window|s; I; 32|
|00000210| 62 69 74 29 0a 54 6f 3a | 20 72 6a 2e 6d 69 6c 6c |bit).To:| rj.mill|
|00000220| 73 40 70 74 69 2d 75 73 | 2e 63 6f 6d 0a 0a 72 6a |s@pti-us|.com..rj|
|00000230| 2e 6d 69 6c 6c 73 40 70 | 74 69 2d 75 73 2e 63 6f |.mills@p|ti-us.co|
|00000240| 6d 20 28 44 69 63 6b 20 | 4d 69 6c 6c 73 29 20 77 |m (Dick |Mills) w|
|00000250| 72 6f 74 65 3a 0a 3e 49 | 27 6d 20 74 72 61 63 6b |rote:.>I|'m track|
|00000260| 69 6e 67 20 61 20 73 74 | 72 61 6e 67 65 20 62 75 |ing a st|range bu|
|00000270| 67 2c 20 74 68 61 74 20 | 68 61 73 20 74 6f 20 64 |g, that |has to d|
|00000280| 6f 20 77 69 74 68 20 74 | 68 65 20 6e 65 77 2f 64 |o with t|he new/d|
|00000290| 65 6c 65 74 65 0a 3e 68 | 65 61 70 20 62 65 69 6e |elete.>h|eap bein|
|000002a0| 67 20 64 61 6d 61 67 65 | 64 2e 20 20 49 74 20 73 |g damage|d. It s|
|000002b0| 65 65 6d 73 20 74 6f 20 | 68 61 76 65 20 74 6f 20 |eems to |have to |
|000002c0| 64 6f 20 77 69 74 68 20 | 61 6e 20 6f 62 6a 65 63 |do with |an objec|
|000002d0| 74 0a 3e 74 68 61 74 20 | 75 73 65 73 20 64 65 6c |t.>that |uses del|
|000002e0| 65 74 65 20 61 6e 64 20 | 6e 65 77 20 66 72 6f 6d |ete and |new from|
|000002f0| 20 74 68 65 20 63 6f 6e | 73 74 72 75 63 74 6f 72 | the con|structor|
|00000300| 2e 20 20 54 68 69 73 20 | 69 6e 73 74 61 6e 63 65 |. This |instance|
|00000310| 0a 3e 6f 66 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |.>of the| object |
|00000320| 69 73 20 6d 6f 64 75 6c | 65 20 73 74 61 74 69 63 |is modul|e static|
|00000330| 2e 0a 3e 0a 3e 49 74 20 | 6f 63 63 75 72 65 64 20 |..>.>It |occured |
|00000340| 74 6f 20 6d 65 20 74 68 | 61 74 20 74 68 65 20 6c |to me th|at the l|
|00000350| 61 6e 67 75 61 67 65 20 | 6d 69 67 68 74 20 6e 6f |anguage |might no|
|00000360| 74 20 67 75 72 61 6e 74 | 65 65 20 74 68 61 74 0a |t gurant|ee that.|
|00000370| 3e 74 68 65 20 70 72 65 | 61 6d 62 6c 65 20 74 6f |>the pre|amble to|
|00000380| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 68 65 61 70 | initial|ize heap|
|00000390| 20 6d 61 6e 61 67 65 6d | 65 6e 74 20 69 73 20 65 | managem|ent is e|
|000003a0| 78 65 63 75 74 65 64 20 | 62 65 66 6f 72 65 0a 3e |xecuted |before.>|
|000003b0| 73 74 61 74 69 63 20 6f | 62 6a 65 63 74 20 63 6f |static o|bject co|
|000003c0| 6e 73 74 72 75 63 74 6f | 72 73 2e 0a 3e 0a 3e 57 |nstructo|rs..>.>W|
|000003d0| 65 27 72 65 20 75 73 69 | 6e 67 20 63 66 72 6f 6e |e're usi|ng cfron|
|000003e0| 74 20 6f 6e 20 53 6f 6c | 61 72 69 73 2e 0a 3e 0a |t on Sol|aris..>.|
|000003f0| 3e 41 6d 20 49 20 62 61 | 72 6b 69 6e 67 20 75 70 |>Am I ba|rking up|
|00000400| 20 74 68 65 20 77 72 6f | 6e 67 20 74 72 65 65 3f | the wro|ng tree?|
|00000410| 0a 3e 0a 3e 0a 0a 54 72 | 75 65 20 69 73 2c 20 74 |.>.>..Tr|ue is, t|
|00000420| 68 61 74 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |hat ther|e is no |
|00000430| 67 75 61 72 61 6e 74 65 | 65 20 61 62 6f 75 74 20 |guarante|e about |
|00000440| 74 68 65 20 6f 72 64 65 | 72 20 69 6e 20 77 68 69 |the orde|r in whi|
|00000450| 63 68 20 73 74 61 74 69 | 63 20 0a 76 61 72 69 61 |ch stati|c .varia|
|00000460| 62 6c 65 73 20 61 72 65 | 20 69 6e 69 74 69 61 6c |bles are| initial|
|00000470| 69 7a 65 64 2e 0a 0a 4f | 6e 20 74 68 65 20 6f 74 |ized...O|n the ot|
|00000480| 68 65 72 20 68 61 6e 64 | 3a 20 49 66 20 79 6f 75 |her hand|: If you|
|00000490| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 61 20 73 74 | initial|ize a st|
|000004a0| 61 74 69 63 20 6f 62 6a | 65 63 74 2c 20 74 68 69 |atic obj|ect, thi|
|000004b0| 73 20 69 6d 70 6c 69 63 | 69 74 6c 79 20 0a 6d 65 |s implic|itly .me|
|000004c0| 61 6e 73 2c 20 74 68 61 | 74 20 74 68 65 20 63 6f |ans, tha|t the co|
|000004d0| 6e 73 74 72 75 63 74 6f | 72 20 69 73 20 63 61 6c |nstructo|r is cal|
|000004e0| 6c 65 64 20 66 6f 72 20 | 74 68 61 74 20 6f 62 6a |led for |that obj|
|000004f0| 65 63 74 2e 20 49 6e 20 | 6f 74 68 65 72 20 0a 77 |ect. In |other .w|
|00000500| 6f 72 64 73 3a 20 74 68 | 65 20 72 75 6e 74 69 6d |ords: th|e runtim|
|00000510| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 73 68 |e enviro|nment sh|
|00000520| 6f 75 6c 64 20 62 65 20 | 61 76 61 69 6c 61 62 6c |ould be |availabl|
|00000530| 65 20 61 74 20 74 68 65 | 20 74 69 6d 65 20 74 68 |e at the| time th|
|00000540| 65 20 0a 63 6f 6e 73 74 | 72 75 63 74 6f 72 20 69 |e .const|ructor i|
|00000550| 73 20 65 78 65 63 75 74 | 65 64 2e 0a 0a 49 20 68 |s execut|ed...I h|
|00000560| 61 76 65 20 64 6f 6e 65 | 20 74 68 69 73 2c 20 74 |ave done| this, t|
|00000570| 6f 6f 2c 20 61 6e 64 20 | 65 78 70 65 72 69 65 6e |oo, and |experien|
|00000580| 63 65 64 20 6e 6f 20 70 | 72 6f 62 6c 65 6d 73 20 |ced no p|roblems |
|00000590| 73 6f 20 66 61 72 2e 0a | 0a 28 49 20 77 61 73 2f |so far..|.(I was/|
|000005a0| 61 6d 20 75 73 69 6e 67 | 20 56 69 73 75 61 6c 20 |am using| Visual |
|000005b0| 43 2b 2b 20 31 2e 31 2c | 20 32 2e 78 2c 20 34 2e |C++ 1.1,| 2.x, 4.|
|000005c0| 30 20 28 69 6e 63 6c 75 | 64 69 6e 67 20 73 65 72 |0 (inclu|ding ser|
|000005d0| 76 69 63 65 20 70 61 63 | 6b 20 31 29 29 2e 0a 0a |vice pac|k 1))...|
|000005e0| 41 6e 6f 74 68 65 72 20 | 70 6f 73 73 69 62 69 6c |Another |possibil|
|000005f0| 69 74 79 20 63 61 6e 20 | 62 65 20 74 68 61 74 20 |ity can |be that |
|00000600| 79 6f 75 72 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |your env|ironment|
|00000610| 20 74 72 65 61 74 73 20 | 63 65 72 74 61 69 6e 20 | treats |certain |
|00000620| 70 61 72 74 73 20 0a 6f | 66 20 74 68 65 20 68 65 |parts .o|f the he|
|00000630| 61 70 20 6d 61 6e 61 67 | 65 6d 65 6e 74 20 6a 75 |ap manag|ement ju|
|00000640| 73 74 20 61 73 20 73 74 | 61 74 69 63 20 76 61 72 |st as st|atic var|
|00000650| 69 61 62 6c 65 73 2e 20 | 54 68 69 73 20 63 6f 75 |iables. |This cou|
|00000660| 6c 64 20 6d 65 61 6e 2c | 0a 74 68 61 74 20 74 68 |ld mean,|.that th|
|00000670| 65 79 20 6d 69 67 68 74 | 20 62 65 20 65 78 65 63 |ey might| be exec|
|00000680| 75 74 65 64 20 41 46 54 | 45 52 20 79 6f 75 20 74 |uted AFT|ER you t|
|00000690| 72 69 65 64 20 74 6f 20 | 69 6e 69 74 69 61 6c 69 |ried to |initiali|
|000006a0| 7a 65 20 73 74 61 74 69 | 63 20 0a 6f 62 6a 65 63 |ze stati|c .objec|
|000006b0| 74 73 2c 20 61 73 20 74 | 68 65 72 65 20 69 73 20 |ts, as t|here is |
|000006c0| 6e 6f 20 67 75 61 72 61 | 6e 74 65 65 20 61 62 6f |no guara|ntee abo|
|000006d0| 75 74 20 74 68 65 20 6f | 72 64 65 72 20 69 6e 20 |ut the o|rder in |
|000006e0| 77 68 69 63 68 20 73 74 | 61 74 69 63 20 0a 76 61 |which st|atic .va|
|000006f0| 72 69 61 62 6c 65 73 20 | 61 72 65 20 69 6e 69 74 |riables |are init|
|00000700| 69 61 6c 69 7a 65 64 20 | 28 61 73 20 49 20 6d 65 |ialized |(as I me|
|00000710| 6e 74 69 6f 6e 65 64 20 | 61 62 6f 76 65 29 2e 0a |ntioned |above)..|
|00000720| 0a 54 6f 20 66 69 6e 64 | 20 6f 75 74 20 79 6f 75 |.To find| out you|
|00000730| 20 6e 65 65 64 20 61 20 | 67 6f 6f 64 20 64 65 62 | need a |good deb|
|00000740| 75 67 67 65 72 2c 20 77 | 68 69 63 68 20 61 6c 6c |ugger, w|hich all|
|00000750| 6f 77 73 20 79 6f 75 20 | 74 6f 20 73 74 65 70 20 |ows you |to step |
|00000760| 69 6e 74 6f 20 0a 74 68 | 65 20 69 6e 69 74 69 61 |into .th|e initia|
|00000770| 6c 69 7a 61 74 69 6f 6e | 20 63 6f 64 65 20 6f 66 |lization| code of|
|00000780| 20 79 6f 75 72 20 65 78 | 65 63 75 74 61 62 6c 65 | your ex|ecutable|
|00000790| 2e 20 49 6e 20 74 68 69 | 73 20 77 61 79 20 79 6f |. In thi|s way yo|
|000007a0| 75 20 63 61 6e 20 0a 63 | 68 65 63 6b 20 74 68 65 |u can .c|heck the|
|000007b0| 20 6f 72 64 65 72 20 69 | 6e 20 77 68 69 63 68 20 | order i|n which |
|000007c0| 73 74 61 74 69 63 20 76 | 61 72 69 61 62 6c 65 73 |static v|ariables|
|000007d0| 20 61 72 65 20 69 6e 69 | 74 69 61 6c 69 7a 65 64 | are ini|tialized|
|000007e0| 2e 0a 0a 48 6f 70 65 20 | 74 68 69 73 20 68 65 6c |...Hope |this hel|
|000007f0| 70 73 2e 0a 0a 2d 2d 20 | 0a 52 65 67 61 72 64 73 |ps...-- |.Regards|
|00000800| 2c 20 4d 61 6e 66 72 65 | 64 2e 0a 0a 2d 2d 2d 2d |, Manfre|d...----|
|00000810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000830| 2d 2d 2d 2d 2d 2d 0a 4d | 61 6e 66 72 65 64 20 4c |------.M|anfred L|
|00000840| 61 6e 67 65 0a 48 65 77 | 6c 65 74 74 2d 50 61 63 |ange.Hew|lett-Pac|
|00000850| 6b 61 72 64 20 28 44 65 | 75 74 73 63 68 6c 61 6e |kard (De|utschlan|
|00000860| 64 29 20 47 6d 62 48 0a | 45 53 54 4c 20 28 45 75 |d) GmbH.|ESTL (Eu|
|00000870| 72 6f 70 65 61 6e 20 53 | 75 70 70 6f 72 74 20 54 |ropean S|upport T|
|00000880| 65 63 68 6e 6f 6c 6f 67 | 79 20 4c 61 62 29 0a 42 |echnolog|y Lab).B|
|00000890| 6f 65 62 6c 69 6e 67 65 | 6e 2c 20 47 65 72 6d 61 |oeblinge|n, Germa|
|000008a0| 6e 79 0a 65 6d 61 69 6c | 3a 20 4d 61 6e 66 72 65 |ny.email|: Manfre|
|000008b0| 64 5f 4c 61 6e 67 65 40 | 62 62 6e 2e 68 70 2e 63 |d_Lange@|bbn.hp.c|
|000008c0| 6f 6d 0a 0a 4d 79 20 6f | 70 69 6e 69 6f 6e 20 64 |om..My o|pinion d|
|000008d0| 6f 65 73 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 |oes not |need to |
|000008e0| 62 65 20 74 68 61 74 20 | 6f 66 20 48 50 21 0a 2d |be that |of HP!.-|
|000008f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 0a 0a |--------|-... |
+--------+-------------------------+-------------------------+--------+--------+